The present disclosure relates to the field of data processing, and more specifically to gray component replacement in color conversions.
Digital devices that create (e.g., scanners and digital cameras), display (e.g. CRT and LCD monitors), or print (e.g. ink jet and laser printers) colors typically define color data using color spaces. Generally, a color space is a combination of a color model and a gamut. A color model defines each color within the model using color components, such as, in the case of a Red, Green, Blue (RGB) color model, the levels of red, green, and blue light components needed to create each color, or in the case of a Cyan, Magenta, Yellow, and Key (CMYK) color model, the levels of cyan, magenta, yellow, and black ink needed to create each color. Some color models use primary components that are not primary colors, but are more abstract, such as the CIE XYZ color space. Levels of each component in the color models typically range from 0 to 100 percent of full intensity, which may be represented on a scale of 0 to 1. By varying the levels or intensities of the primary components, various colors in the color model may be created. However, as a practical matter a device is often limited in its ability to produce pure cyan, magenta, or yellow ink, which limits its range of colors or color gamut. A gamut is simply the range of colors that may be displayed on, rendered by, or captured by a particular device. Thus, each color in the color gamut can be represented as a tuple of the various components, such as (1,1,1) may represent white in an RGB color space where 1 is the maximum intensity for each of the color components.
Each device, depending on its limitations and definitions for pure primary colors, may have a different color gamut and thus color space. To facilitate rendering the same color in two different color spaces such that the color appears substantially the same in both color spaces, conversion methods may be performed. Converting from one device-dependent color space to another is often accomplished through an intermediary device-independent color space, which define colors in more absolute terms. Some examples of device-independent color spaces include the CIE XYZ, CIE L*a*b* (luminance, a, b), and CIE LCH (luminance, chroma, hue) color spaces. The relationship of a device's native color space with a device-independent color space typically is described by some combination of formulas, transfer functions, matrices, and look up tables. This relationship may be stored in an International Color Consortium (ICC) profile for the device. Methods to convert among the various device-independent color spaces are well known in the art.
The conversion from one color space to another may be done through a series of conventional processing steps. Some processing steps may be more computationally intensive than others. Some processing steps may require interpolation. Generally, there is a tradeoff between the number of steps, the complexity of each step, speed, and accuracy. In some applications, speed is of the essence and accuracy is sacrificed by reducing the number of steps and/or the complexity of the individual steps. Often to increase speed, a lookup table (LUT) is used either alone or with another simple processing step. A LUT maps points in one color space to corresponding points in another color space. For example, a color in a first RGB color space may have the color component values of (0, 45, 82) which, when converted to a second RGB color space, the color may have the color component values (5, 51, 76). This is because the ICC profile for each color space defines pure R, G, and B components differently. A LUT may be constructed by transforming a regularly spaced grid of color values in a first color space to a second color space using the most accurate processing steps, such as using the ICC profiles for example. Each grid point and its corresponding transform point in the second color space may be stored in the LUT. Converting colors that do not correspond to the grid points would involve interpolation, therefore, the more grid points the more accurate the conversion. However, increasing the number of the grid points complicates the LUT and may result in an increase in processing time.